﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using SingleUserMall.Authorization.Users;
using System;

namespace SingleUserMall.Complains.VO
{
    /// <summary>
    /// 投诉VO
    /// </summary>
    [AutoMapFrom(typeof(Complain))]
    public class ComplainViewVO:EntityDto
    {
        internal User inUser { get; set; }
        /// <summary>
        /// 投诉人姓名
        /// </summary>
        public string UserName => inUser?.Name ?? "";
        /// <summary>
        /// 投诉图片
        /// </summary>
        public string Picture { get; set; }
        /// <summary>
        /// 审核状态
        /// </summary>
        public ComplainVerifyStatus Status { get; set; }
        /// <summary>
        /// 投诉类型
        /// </summary>
        public ComplainType ComplainType { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 投诉用户id
        /// </summary>
        public long UserId { get; set; }
        /// <summary>
        /// 审核状态名称
        /// </summary>
        public string StatusView => Status.GetDescription();
        /// <summary>
        /// 投诉类型名称
        /// </summary>
        public string ComplainTypeView => ComplainType.GetDescription();
        /// <summary>
        /// 投诉时间
        /// </summary>
        public DateTime CreationTime { get; set; }
        /// <summary>
        /// 原因
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime LastModificationTime { get; set; }
    }
}
